<?php
include_once("inithome.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
                                   __                                           
       __                         /\ \                                          
   __ /\_\    ___      __     ____\ \ \___   __  __     __      ___      __     
 /'__`\/\ \ /' _ `\  /'_ `\  /',__\\ \  _ `\/\ \/\ \  /'__`\  /' _ `\  /'_ `\   
/\ \L\ \ \ \/\ \/\ \/\ \L\ \/\__, `\\ \ \ \ \ \ \_\ \/\ \L\.\_/\ \/\ \/\ \L\ \  
\ \___, \ \_\ \_\ \_\ \____ \/\____/ \ \_\ \_\ \____/\ \__/.\_\ \_\ \_\ \____ \ 
 \/___/\ \/_/\/_/\/_/\/___L\ \/___/   \/_/\/_/\/___/  \/__/\/_/\/_/\/_/\/___L\ \
      \ \_\            /\____/                                           /\____/
       \/_/            \_/__/                                            \_/__/ 

-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta property="wb:webmaster" content="c1d1e78adfc575f7" />
<title>清爽版微博</title>
<link href="/style/index.css?v=126" type="text/css" rel="stylesheet" charset="utf-8" />
<script type="text/javascript" src="/js/json2.js"></script>
<script type="text/javascript" src="/js/base64.js"></script>
<script type="text/javascript" src="/js/faces.js?v=1"></script>
<script type="text/javascript" src="/js/index.js?v=145"></script>
<script type="text/javascript">
<?php
if($_GET["name"]){
	echo "var uname = '" . urlencode($_GET["name"]) . "';";
}
else{
	echo "var uname = '';";
}
if($_GET["search"]){
	echo "var q = '" . urlencode($_GET["search"]) . "';";
}
else{
	echo "var q = '';";
}
if($_GET["type"]){
	echo "var ty = '" . $_GET["type"] . "';";
}
else{
	echo "var ty = '';";
}
if($_GET["post"]){
	echo "var post = '" . $_GET["post"] . "';";
}
else{
	echo "var post = '';";
}
if($_GET["trend"]){
	echo "var trend = '" . urlencode($_GET["trend"]) . "';";
}
else{
	echo "var trend = '';";
}
if($_GET["friendships"]){
	echo "var friendships = '" . $_GET["friendships"] . "';";
}
else{
	echo "var friendships = '';";
}
?>
</script>
</head>
<body onload="initCanvas();" onscroll="getRestHeight(<?php if($_GET['post']){echo "'comments'";}else if($_GET['friendships']){echo "'friendship'";}else if($_GET["type"] == "comments"){echo "'commentline'";}else if($_GET["type"] == "sentcomments"){echo "'sentcommentline'";}else if($_GET["type"] == "mentioncomments"){echo "'mentioncommentline'";}else{echo 0;} ?>, <?php echo isset($_GET['cache'])?1:0; ?>);">
<div id="canvasDiv">
<canvas id="mainCanvas" width="400" height="300" onmousedown="clickCanvas(event);">
It looks like your browser does not support Canvas.
Try FireFox, Chrome, Opera, or Safari instead.
</canvas>
<div style="margin: 10px;">
<input type="button" value="画完了" onclick="getCanvasImage();" /> <input type="button" value="清除" onclick="clearCanvas();" /> <input type="button" value="关闭" onclick="hideCanvas();" />
</div>
</div>
<div id="imglayer" title="点击以返回" alt="点击以返回" onclick="this.style.display='none';document.body.style.overflow = 'auto';"></div>
<?php include_once("headline.php"); ?>
<div id="headTop">
<?php include_once("nav.php"); ?>
<div id="headTopShadow"></div>
</div>
</div>
<div id="mainDiv" class="mainDiv">
<div id="top"></div>
<!-- Main Start-->
<div id="mainInner" class="mainInner">
<!-- Left Timeline Start -->
<div class="timeLine">

<?php
include_once("sharebox.php");
?>
<div id="newpostnotice" class="moreTimeLine" style="display:none;" onclick="unreadPost=false;this.style.display='none';showNewPost();">您有未读微博</div>
<div id="newPost" class="newPost"></div>
<div id="timeLine">
<?php
if($_GET["search"] && !isset($_GET["cache"])){
	$q = $_GET["search"];
	if(substr($q,0,7)=="base64:"){
		$q = base64_decode(substr($q,7));
	}
?>
<div class="searchKey"><strong><?php echo $q; ?></strong>的搜索结果 - 只列出了部分结果，<a target="_blank" href="http://s.weibo.com/weibo/<?php echo $q; ?>">查看完整结果</a></div>
<?php
}
if($_GET["trend"]){
?>
<div class="searchKey">话题<strong>#<?php echo $_GET["trend"]; ?>#</strong>的搜索结果</div>
<?php
}
if($_GET["post"]){
	include_once("post.php");
}
else if($_GET["friendships"]){
	if($_GET['name']){
		$userMessage = $c->show_user_by_name($_GET['name']);
	}
	if($_GET["friendships"] == "friends"){
?>
<div class="friendshipsTitle"><?php if($_GET['name']){echo $uid==$userMessage["id"]?"我":($userMessage["gender"]=="m"?"他":($userMessage["gender"]=="f"?"她":"TA"));} else{echo "我";} ?>关注的人</div>
<?php
	}
	if($_GET["friendships"] == "followers"){
?>
<div class="friendshipsTitle">关注<?php if($_GET['name']){echo $uid==$userMessage["id"]?"我":($userMessage["gender"]=="m"?"他":($userMessage["gender"]=="f"?"她":"TA"));} else{echo "我";} ?>的人</div>
<?php
	}
	include_once("friends.php");
}
else if($_GET["type"] == "comments" || $_GET["type"] == "sentcomments" || $_GET["type"] == "mentioncomments"){
	include_once("commentline.php");
}
else{
	$loadTimeLine = true;
}
?>
</div>
<?php
if($_GET["friendships"]){
?>
<div class="floatClear"></div>
<?php
}
?>
<div id="timeLineLoading" class="timeLineLoading"></div>
<div id="moreTimeLine" class="moreTimeLine" onclick="this.style.display='none';page++;<?php if($_GET['post']){echo "getComments(page);";}else if($_GET['friendships']){echo "if(cursor){getFriends(cursor);}else{return false;}";}else if($_GET["type"]=="comments" || $_GET["type"]=="sentcomments" || $_GET["type"]=="mentioncomments"){echo "getCommentline(page, '".$_GET["type"]."');";}else{echo "getPost(page, uname, ".(isset($_GET['cache'])?1:0).");";}?>document.getElementById('timeLineLoading').style.display='block';">更多</div>

</div>
<!-- Left Timeline End -->

<?php
include_once("sidebar.php");
?>

<div class="floatClear"></div>
</div>

<!-- Footer Start -->
<div class="footer">
<div>清爽版微博 - <a href="#" style="color: #025BFE;" onclick="showpublic();return false;">声明</a></div>
</div>
<!-- Footer End -->
<!-- Main End-->
</div>
<div id="ats" onmouseover="atsl=true;" onmouseout="atsl=false;"></div>
<div id="messageBackground">
<div id="messageBoxDiv" class="messageBox" onmouseover="mmo=true;" onmouseout="mmo=false;">
<div id="messageBox"></div>
<div class="messageButtonDiv"><button id="leftMessageButton"></button><button id="rightMessageButton"></button></div>
</div>
<div onselectstart="return false;" unselectable="on" class="messageBackground" onclick="if(!mmo){document.getElementById('messageBackground').style.display='none';}">
</div>
</div>
<div id="feedback" onclick="showPFeedbackBox();">问题反馈</div>
<script type="text/javascript">
doPos();
window.onresize = doPos;
window.onclick = function(){if(!atsl){hideatsuggest();}}

setInterval(getNewMessage, 30000);
setTimeout(getNewMessage, 5000);
<?php
if($loadTimeLine){
?>
getPost(page, uname, <?php echo isset($_GET['cache'])?1:0; ?>);document.getElementById("moreTimeLine").style.display='none';document.getElementById('timeLineLoading').style.display='block';
if(!uname && !q && !ty && !post && !trend && !friendships){
	setInterval(function(){getNewWeibo(0);}, 120000);
}
<?php
}
?>
</script>
</body>
</html>